package com.zoran.study.spring.model;

import com.zoran.study.spring.aop.Mark;
import lombok.Data;
import org.springframework.beans.factory.InitializingBean;

import java.io.Serializable;

/**
 * User
 *
 * @author zouxm
 * @date 17/10/4
 */

@Data
@Mark(value = "name", action = "update")
public class User implements Serializable, InitializingBean {

    private Integer id;

    private String code;

    private String pass;

    private String name;

    public User() {
    }

    public User(String name) {
        this.name = name;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("afterPropertiesSet init user...");
    }

    @Mark(value = "say", action = "select")
    public String say(String msg) {
        return "say" + msg;
    }


}
